<?php


//使用样例不可以执行
exit();
include_once("ThePage.class.php");
$page = new ThePage();

$cur_city_arr = $page->tree->get_city_arr($page->city_no);


$adb = Factory::getDB("ads_article");
$col = "ads_article_id";
$where = "ads_type_id=12 AND ads_article_auditing=1";
if(!empty($page->city_no)) $where .=" AND ads_city_no='{$page->city_no}' ";

$rowNo = $adb->getSumNumber($adb->tableName,$where);

$p_page = Factory::getBaseClass('pagination');
$p_page->set($rowNo,5);
$numrows = 5;
$offset  = $p_page->getSqlMove();
$arr = $adb->getAll($where,$col,$numrows,$offset);


$adb = Factory::getDB("ads_article");
$col = "ads_article_id";
$where = "ads_type_id=8 AND ads_article_auditing=1";
if(!empty($page->city_no)) $where .=" AND ads_city_no='{$page->city_no}' ";
$arr2 = $adb->getAll($where,$col,8);

$page->smarty->assign("act_arr_2",$arr2);
$page->smarty->assign("act_arr",$arr);
$page->smarty->assign("page_footer",$p_page->getFooter().$p_page->getJumpPage());
$page->smarty->assign("cur_city_arr",$cur_city_arr);
$page->smarty->display("index.tpl");
?>